home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 15
/
Aminet 15 - Nov 1996.iso
/
Aminet
/
dev
/
gcc
/
ixemsdk.lha
/
man
/
cat3
/
times.0
< prev
next >
Wrap
Text File
|
1996-09-02
|
3KB
|
65 lines
TIMES(3) UNIX Programmer's Manual TIMES(3)
NNAAMMEE
ttiimmeess - process times
SSYYNNOOPPSSIISS
##iinncclluuddee <<ssyyss//ttiimmeess..hh>>
_c_l_o_c_k___t
ttiimmeess(_s_t_r_u_c_t _t_m_s _*_t_p)
DDEESSCCRRIIPPTTIIOONN
TThhiiss iinntteerrffaaccee iiss oobbssoolleetteedd bbyy ggeettrruussaaggee((22)) aanndd ggeettttiimmeeooffddaayy((33))..
The ttiimmeess() function returns the value of time in CLK_TCK's of a second
since 0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Univer-
sal Time.
It also fills in the structure pointed to by _t_p with time-accounting in-
formation.
The _t_m_s structure is defined as follows:
typedef struct {
clock_t tms_utime;
clock_t tms_stime;
clock_t tms_cutime;
clock_t tms_cstime;
}
The elements of this structure are defined as follows:
_t_m_s___u_t_i_m_e The CPU time charged for the execution of user instructions.
_t_m_s___s_t_i_m_e The CPU time charged for execution by the system on behalf of
the process.
_t_m_s___c_u_t_i_m_e The sum of the _t_m_s___u_t_i_m_e _s and _t_m_s___c_u_t_i_m_e _s of the child pro-
cesses.
_t_m_s___c_s_t_i_m_e The sum of the _t_m_s___s_t_i_m_es and _t_m_s___c_s_t_i_m_es of the child pro-
cesses.
All times are in CLK_TCK's of a second.
The times of a terminated child process are included in the _t_m_s___c_u_t_i_m_e
and _t_m_s___c_s_t_i_m_e elements of the parent when one of the wait(2) functions
returns the process ID of the terminated child to the parent. If an er-
ror occurs, ttiimmeess() returns the value ((clock_t)-1), and sets _e_r_r_n_o to
indicate the error.
EERRRROORRSS
The ttiimmeess() function may fail and set the global variable _e_r_r_n_o for any
of the errors specified for the library routines getrusage(2) and
gettimeofday(2).
SSEEEE AALLSSOO
time(1), getrusage(2), gettimeofday(2), wait(2)
SSTTAANNDDAARRDDSS
The ttiimmeess() function conforms to IEEE Std1003.1-1988 (``POSIX'').
4th Berkeley Distribution June 4, 1993 1